<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.nobody.facepk.service.ServiceRegistry"%>
<%@page import="com.nobody.facepk.model.Picture"%>
<%@page import="com.nobody.facepk.model.Friends"%>
<%@page import="com.nobody.facepk.model.Comment"%>
<%@page import="com.nobody.facepk.sns.Event"%>
<%@page import="com.nobody.facepk.sns.EventType"%>
<%@page import="com.nobody.facepk.model.User"%>
<%@page import="com.nobody.facepk.view.MatchView"%>
<%@page import="com.nobody.facepk.service.PictureService"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'gradeInfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  <%
  long pictureId = Long.parseLong(request.getParameter("pictureId"));
  PictureService pictureService = ServiceRegistry.getPictureService();
  Picture pic = pictureService.getPictureByid(pictureId);
  String picPath = pic.getPath();
  String picName = pic.getName();
  String realPath = "pictures/"+pic.getUserId()+"/"+picPath;
   %>
   <form action="grade.do" method="post">  
   <img src="<%=realPath%>" height="240" width="240"/><br/>
   <textarea rows="20" cols="40"></textarea><br/>
   <input type="hidden" value="<%=pic.getId()%>" id="pictureId" name = "pictureId">
   <input type ="submit" value="发起评分">
 
    	</form>
  <body>
  	<br>
  </body>
</html>
